import java.io.Serializable;


public class Player implements Serializable
{
        
        //creates a new player
        public Player(String aName, int aScore)
        {
                
                name = aName;
                score = aScore;
                
        }
        
        
        //gets player´s name
        public String getName()
        {
                
                return name;
                
        }
        
        //gets player´s score
        public int getScore()
        {
                
                return score;
                
        }
        
        
        // checks if new player´s highscore is higher than the previous
        public boolean isLarger(Player other)
        {
                
                if (this.getScore() > other.getScore())
                        return true;
                else return false;
                
        }
        
        
        private String name;
        private int score;
}

